<template>
    <div>
        <Home v-if="show === 'home'"></Home>
        <News v-else-if="show === 'news'"></News>
        <Product v-else-if="show === 'product'"></Product>
        <About v-else></About>
    </div>
</template>
<script>
import Home from '../views/Home.vue';
import News from '../views/News.vue';
import Product from '../views/Product.vue';
import About from '../views/About.vue';
export default {
    components:{Home,News,Product,About},
    props:{
        //可配置
        show:{
            type:String,//Number,Object,Function
            default:'home',
        }
    },
}
</script>